package org.jgs1904.oopbase.test.myextend;

/**
 * @author: 默苍璃
 * @date: 2022-09-13 15:18
 */
public class Main {
    public static void main(String[] args) {
        Student student = new Student();
        student.setName("666");
        String hello = student.hello();
        System.out.println(hello);


        //instanceof
        Person p = new Person();
        System.out.println(p instanceof Person); // true
        System.out.println(p instanceof Student); // false

        Student s = new Student();
        System.out.println(s instanceof Person); // true
        System.out.println(s instanceof Student); // true

        Student n = null;
        System.out.println(n instanceof Student); // false
    }
}
